<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<base href="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}">
<html>
<head>
<jsp:include page="../layout/_head_css.jsp"></jsp:include>

<title>员工列表</title>
</head>
<body>
	<div class="col-md-12 col-sm-12 col-sx-12">
<div class="panel panel-default">
<div class="panel-heading" align="center">
        <h4>员工信息一览表</h4>
</div>
<div class="panel-body">
<div class="table-responsive">
<table class="table table-bordered no-margin">
    <thead>
    <tr>
        				<th>编号</th>
						<th>姓名</th>
						<th>工职</th>
						<th>上级领导编号</th>
						<th>性别</th>
						<th>入职时间</th>
						<th>工资</th>
						<th>薪水</th>
						<th>部门编号</th>
						<th>操作</th>
    </tr>
    </thead>
    <tbody>
        <c:forEach var="em" items="${employees}">
            <tr>
               			<td>${em.empno}</td>
						<td>${em.ename}</td>
						<td>${em.job}</td>
						<td>${em.mgr}</td>
						<td>${em.gender}</td>
						<td>
						<fmt:formatDate value="${em.hirdate}"  pattern="yyyy-MM-dd"/>
						</td>
						<td>${em.sal}</td>
						<td>${em.comm}</td>
						<td>${em.deptno}</td>
						<td>
							<a href="${pageContext.request.contextPath}/employees/${em.empno}/update" class="btn btn-rounded btn-sm btn-success">修改</a>
							<a  href="${pageContext.request.contextPath}/employees/${em.empno}/delete" class="btn btn-rounded btn-sm btn-danger">删除</a>
						</td>
            </tr>
        </c:forEach>
    </tbody>
</table>
 <div class="panel-heading" align="left">
        <h3 ><a href="${pageContext.request.contextPath }/employees/create">添加员工</a></h3>
</div>
    </div>
    </div>
    </div>
    </div>
<script type="text/javascript" src="${pageContext.request.contextPath}/assets/lib/jquery.min.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/assets/app/js/employee.js"></script>
</body>
</html>